﻿// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)

// Unlit shader. Simplest possible textured shader.
// - no lighting
// - no lightmap support
// - no per-material color

Shader "Unlit/TextureMainColor" {
Properties 
{
	_MainTex0 ("Base (RGB)", 2D) = "white" {}
	_Color ("Main Color", Color) = (1,1,1,1)

}

SubShader {
	Tags { "RenderType"="Transparent"  "Queue" = "Transparent"}

		Blend SrcAlpha OneMinusSrcAlpha 

	Pass {  
		CGPROGRAM

			#pragma vertex vert
			#pragma fragment frag
			#pragma target 2.0
			#pragma multi_compile_fog
			
			#include "UnityCG.cginc"

			fixed4 _Color;

			sampler2D _MainTex0;
			float4 _MainTex0_ST;

			struct appdata_t {
				float4 vertex : POSITION;
				float2 uv:TEXCOORD0;
			};

			struct v2f {
				float4 vertex : SV_POSITION;
				float2 uv : TEXCOORD0;
			};


			v2f vert (appdata_t v)
			{
				v2f o;
				o.vertex = UnityObjectToClipPos(v.vertex);
				o.uv = TRANSFORM_TEX(v.uv, _MainTex0);
				return o;
			}
			
			fixed4 frag (v2f i) : SV_Target
			{
				fixed4 col0 = tex2D(_MainTex0, i.uv);
				col0 = col0 * _Color;
//				UNITY_OPAQUE_ALPHA(col.a);
				return col0;
			}
		ENDCG
	}
}

}
